package base

import (
	"gitee.com/huangxinbo/xcas/internal/config"
	"gitee.com/huangxinbo/xcas/pkg/i18n"
	"gitee.com/huangxinbo/xcas/pkg/logger"
	"gitee.com/huangxinbo/xcas/pkg/mail"
	"github.com/hibiken/asynq"
	"github.com/redis/go-redis/v9"
	"gorm.io/gorm"
)

type Base struct {
	Config      *config.Config
	Logger      *logger.Logger
	I18n        *i18n.I18n
	Db          *gorm.DB
	RedisClient *redis.Client
	AsynqServer *asynq.Server
	AsynqClient *asynq.Client
	Mail        *mail.Mail
}

func NewBase(config *config.Config, logger *logger.Logger, i18n *i18n.I18n, db *gorm.DB, redisClient *redis.Client, asynqServer *asynq.Server, asynqClient *asynq.Client, mail *mail.Mail) *Base {
	return &Base{
		Config:      config,
		Logger:      logger,
		I18n:        i18n,
		Db:          db,
		RedisClient: redisClient,
		AsynqServer: asynqServer,
		AsynqClient: asynqClient,
		Mail:        mail,
	}
}
